package cn.imu.appdevexperiment2020.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * 描述:
 *
 * @author chenconghua
 * @version 1.0
 * @create 2022-11-04 12:14
 */
public class AuthUtil {

    public static Map<String, String> GetAuth() {
        Long timstamp = System.currentTimeMillis();
        Map<String, String> map = new HashMap<>();
        map.put(AuthConstants.APP_ID, "77");
        map.put(AuthConstants.APP_KEY, "4a1d2a02-7559-4e06-b822-84797e225e36");
        map.put(AuthConstants.TIME_STAMP, String.valueOf(timstamp));
        try {
            map.put(AuthConstants.TOKEN, MD5Util.encrypt(ApiRequest.buildApiRequest(map).toString()));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return map;
    }
}
